package org.lonetree.tc.core;

/**
 * Business class representing physical retailers who are sources for books in
 * the system.
 * 
 * All interfaces between different system components should use objects of this
 * class to pass information about physical sources.
 */
public class PhysicalSource extends Source{

	private String location;
	
	public PhysicalSource(Book parentBook, String name, float price, String description, String location){
		this(null, parentBook, name, price, description, location);
	}
	
	protected PhysicalSource(SourceId sourceId, Book parentBook, String name, float price, String description, String location){
		super(sourceId, parentBook, name, price, description);
		
		if(location == null)
			throw new NullPointerException("location cannot be null");
		
		this.location = location;
	}
	
	/**
	 * Get the location of the source.
	 *
	 * @return location
	 */
	public String getLocation(){
		return location;
	}
}
